<?php /* Smarty version 2.6.22, created on 2009-12-07 13:07:50
         compiled from modulos/eventos.tpl */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/estilos.css">
<title>Untitled Document</title>
<?php echo '
<style type="text/css">
    body{
        color:#333333;
		direction:ltr;
        font-family:Arial, Helvetica, sans-serif;
        font-size:11px;
		text-align:left;
    }
</style>
'; ?>


<?php echo '
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAnfs7bKE82qgb3Zc2YyS-oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA&sensor=true_or_false" type="text/javascript"></script>
<script type="text/javascript">
    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
		var center = new GLatLng(-0.23,-78.5);
		map.setCenter(center, 11);
		var customUI = map.getDefaultUI();
		map.enableDoubleClickZoom();
        map.setCenter(center, 11);
		
		
		// Create our "tiny" marker icon
		var tinyIcon = new GIcon();
		tinyIcon.image = "images/puntero.png";
		tinyIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		tinyIcon.iconSize = new GSize(24, 40);
		tinyIcon.shadowSize = new GSize(44, 40);
		tinyIcon.iconAnchor = new GPoint(12, 40);
		tinyIcon.infoWindowAnchor = new GPoint(5, 1);

		// Set up our GMarkerOptions object literal
		markerOptions = { icon:tinyIcon };
'; ?>
<?php unset($this->_sections['eve']);
$this->_sections['eve']['name'] = 'eve';
$this->_sections['eve']['loop'] = is_array($_loop=$this->_tpl_vars['eventos']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['eve']['show'] = true;
$this->_sections['eve']['max'] = $this->_sections['eve']['loop'];
$this->_sections['eve']['step'] = 1;
$this->_sections['eve']['start'] = $this->_sections['eve']['step'] > 0 ? 0 : $this->_sections['eve']['loop']-1;
if ($this->_sections['eve']['show']) {
    $this->_sections['eve']['total'] = $this->_sections['eve']['loop'];
    if ($this->_sections['eve']['total'] == 0)
        $this->_sections['eve']['show'] = false;
} else
    $this->_sections['eve']['total'] = 0;
if ($this->_sections['eve']['show']):

            for ($this->_sections['eve']['index'] = $this->_sections['eve']['start'], $this->_sections['eve']['iteration'] = 1;
                 $this->_sections['eve']['iteration'] <= $this->_sections['eve']['total'];
                 $this->_sections['eve']['index'] += $this->_sections['eve']['step'], $this->_sections['eve']['iteration']++):
$this->_sections['eve']['rownum'] = $this->_sections['eve']['iteration'];
$this->_sections['eve']['index_prev'] = $this->_sections['eve']['index'] - $this->_sections['eve']['step'];
$this->_sections['eve']['index_next'] = $this->_sections['eve']['index'] + $this->_sections['eve']['step'];
$this->_sections['eve']['first']      = ($this->_sections['eve']['iteration'] == 1);
$this->_sections['eve']['last']       = ($this->_sections['eve']['iteration'] == $this->_sections['eve']['total']);
?><?php echo '
		'; ?>
<?php if ($this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_nivel'] == 3 || $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_creador'] == $this->_tpl_vars['usuId']): ?><?php echo '
                            	
        var coor = new GLatLng('; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_latitud']; ?>
<?php echo ','; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_longitud']; ?>
<?php echo ');                             
		var marker'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_cod']; ?>
<?php echo ' = new GMarker(coor,markerOptions);

		GEvent.addListener(marker'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_cod']; ?>
<?php echo ', "click", function() {
			marker'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_cod']; ?>
<?php echo '.openInfoWindowHtml("<h3><b>'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_nombre']; ?>
<?php echo '</h3><br /><b>Fecha:</b>&nbsp;&nbsp;'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_fecha']; ?>
<?php echo '<br /><b>Hora:</b>&nbsp;&nbsp;'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_hora']; ?>
<?php echo ':'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_minuto']; ?>
<?php echo '<br /><b>Tipo:</b>&nbsp;&nbsp;'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_tipo']; ?>
<?php echo '<br /><b>Descripcion:</b>&nbsp;&nbsp;'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_descripcion']; ?>
<?php echo '");
		});
		map.addOverlay(marker'; ?>
<?php echo $this->_tpl_vars['eventos'][$this->_sections['eve']['index']]['eve_cod']; ?>
<?php echo ');
		'; ?>
<?php endif; ?><?php echo '
		'; ?>
<?php endfor; endif; ?><?php echo '
		map.setUI(customUI);
      }
    }
</script>
'; ?>

</head>

<body onload="initialize()" onunload="GUnload()">
	<a href="ingresarEvento.php" class="menu-agenda-ingresar">Crear nuevo evento</a>
    <div class="mapa" id="map_canvas" style="width: 600px; height: 300px; border:solid 1px;"></div>
    <div class="menu-ciudades">
    Ir a ciudad:
    <select>
    <option onclick="irACiudad(1)">Quito</option>
    <option onclick="irACiudad(2)">Guayaquil</option>
    <option onclick="irACiudad(3)">Cuenca</option>
    <option onclick="irACiudad(4)">Manta</option>
    </select>
    </div>
</body>
</html>